<script>
	$(document).ready(function(){
		
		// Navbar tooltips
		$('.navbar [title]').tooltip({
			placement: 'bottom'
		});
		
		// Content tooltips
		$('[role=main] [title]').tooltip({
			placement: 'top'
		});
		
		// Dropdowns
		$('.dropdown-toggle').dropdown();
		
		// Tabs
		$('.demoTabs a').click(function (e) {
			e.preventDefault();
			$(this).tab('show');
			$('.fullcalendar, .full-calendar-gcal').fullCalendar('render'); // Refresh jQuery FullCalendar for hidden tabs
		})
	});
	
	//设置皮肤					
	function setSkin(skin){
		jQuery.ajax({
			type : 'POST',
			url : '${webRoot}skin/set.do',
			data  :  {skin:skin},
			dataType:'json',
			success : function(data){
				switch(data.CODE){
					case "1":
						location.href=location.href;
						break;
					default:
						alert("错误：修改皮肤失败！请重试！");
				}
			},
			error : function(e) {
				//console.log(e);
			}
		});
	}
</script>
		
<!-- Main navigation bar -->
<header class="navbar navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".user">
				<span class="icon-user"></span>
			</button>
			<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".navigation">
				<span class="icon-chevron-down"></span>
			</button>
			<a class="brand" href="${webRoot}">${webName}_${wwwName}</a>
			<nav class="nav-collapse navigation">
				<ul class="nav" role="navigation">
					<li<#if nav == "1"> class="active"</#if>><a href="${webRoot}center.do" title="学习中心"><span class="icon-home"></span> 学习中心</a></li>
					<li<#if nav == "2"> class="active"</#if>><a href="${webRoot}progress.do" title="学习进度"><span class="icon-calendar"></span> 我的学习进度</a></li>
					<li<#if nav == "3"> class="active"</#if>><a href="${webRoot}qa.do" title="技术问答"><span class="icon-question-sign"></span> 技术问答</a></li>
					<li<#if nav == "4"> class="active"</#if>><a href="${webRoot}ext.do" title="hadoop相关技术扩展学习"><span class="icon-plus"></span> 扩展学习</a></li>
					<li<#if nav == "5"> class="active"</#if>><a href="${webRoot}feedback.do" title="如有不爽，欢迎吐槽"><span class="icon-edit"></span> 意见反馈</a></li>
					<li class="divider-vertical"></li>				
					<li><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=84985152&site=qq&menu=yes" title="找小讲QQ咨询一下" class="btn-wuxia-navbar"><div class="btn btn-wuxia"><span class="icon-group"></span> 在线咨询</div></a></li>
				</ul>
			</nav>
			<nav class="nav-collapse user">
				<div class="user-info pull-right">
					<img src="${uploadRoot}avatar/default.png" alt="用户图像" />
					<div class="btn-group">
						<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
							<div><strong>${Session["dw_name"]?default("无名士")}</strong>训练日:${Session["dh_trainday"]}天  &nbsp; 时长:${Session["dh_onlinetime"]}分</div>
							<span class="caret"></span>
						</a>
						<ul class="dropdown-menu">
							<li><a href="${wwwRoot}user/edit.do"  target="_blank"><span class="icon-cogs"></span> 账户设置</a></li>
							<li><a href=""><span class="icon-bell"></span> 2 条新消息</a></li>
							<li class="skin"><a href="javascript:void(0);"><span class="icon-magnet"></span> 
								<button onclick="setSkin('red')" class='red<#if Session["dh_skin"]=="red"> active</#if>'></button>
								<button onclick="setSkin('orange')" class='orange<#if Session["dh_skin"]=="orange"> active</#if>'></button>
								<button onclick="setSkin('green')" class='green<#if Session["dh_skin"]=="green"> active</#if>'></button>
								<button onclick="setSkin('purple')" class='purple<#if Session["dh_skin"]=="purple"> active</#if>'></button>
								<button onclick="setSkin('blue')" class='blue<#if Session["dh_skin"]=="blue"> active</#if>'></button>
								<button onclick="setSkin('dark')" class='dark<#if Session["dh_skin"]=="dark"> active</#if>'></button>
								</a></li>
							<li class="divider"></li>
							<li><a href="${webRoot}logout.do"><span class="icon-signout"></span> 退出</a></li>
						</ul>
					</div>
				</div>
			</nav>
		</div>
	</div>
</header>
<!-- /Main navigation bar -->
<#setting number_format="#">